

<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>llvm-symbolizer - convert addresses into source code locations &#8212; LLVM 9 documentation</title>
    <link rel="stylesheet" href="../_static/llvm-theme.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script src="../_static/jquery.js"></script>
    <script src="../_static/underscore.js"></script>
    <script src="../_static/doctools.js"></script>
    <script src="../_static/language_data.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="llvm-dwarfdump - dump and verify DWARF debug information" href="llvm-dwarfdump.html" />
    <link rel="prev" title="llvm-stress - generate random .ll files" href="llvm-stress.html" />
<style type="text/css">
  table.right { float: right; margin-left: 20px; }
  table.right td { border: 1px solid #ccc; }
</style>

  </head><body>
<div class="logo">
  <a href="../index.html">
    <img src="../_static/logo.png"
         alt="LLVM Logo" width="250" height="88"/></a>
</div>

    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="llvm-dwarfdump.html" title="llvm-dwarfdump - dump and verify DWARF debug information"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="llvm-stress.html" title="llvm-stress - generate random .ll files"
             accesskey="P">previous</a> |</li>
  <li><a href="http://llvm.org/">LLVM Home</a>&nbsp;|&nbsp;</li>
  <li><a href="../index.html">Documentation</a>&raquo;</li>

          <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">LLVM Command Guide</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">llvm-symbolizer - convert addresses into source code locations</a></li> 
      </ul>
    </div>


    <div class="document">
      <div class="documentwrapper">
          <div class="body" role="main">
            
  <div class="section" id="llvm-symbolizer-convert-addresses-into-source-code-locations">
<h1>llvm-symbolizer - convert addresses into source code locations<a class="headerlink" href="#llvm-symbolizer-convert-addresses-into-source-code-locations" title="Permalink to this headline">¶</a></h1>
<div class="section" id="synopsis">
<h2>SYNOPSIS<a class="headerlink" href="#synopsis" title="Permalink to this headline">¶</a></h2>
<p><strong class="program">llvm-symbolizer</strong> [<em>options</em>] [<em>addresses…</em>]</p>
</div>
<div class="section" id="description">
<h2>DESCRIPTION<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p><strong class="program">llvm-symbolizer</strong> reads object file names and addresses from the
command-line and prints corresponding source code locations to standard output.</p>
<p>If no address is specified on the command-line, it reads the addresses from
standard input. If no object file is specified on the command-line, but
addresses are, or if at any time an input value is not recognized, the input is
simply echoed to the output.</p>
<p>A positional argument or standard input value can be preceded by “DATA” or
“CODE” to indicate that the address should be symbolized as data or executable
code respectively. If neither is specified, “CODE” is assumed. DATA is
symbolized as address and symbol size rather than line number.</p>
<p>Object files can be specified together with the addresses either on standard
input or as positional arguments on the command-line, following any “DATA” or
“CODE” prefix.</p>
</div>
<div class="section" id="examples">
<h2>EXAMPLES<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<p>All of the following examples use the following two source files as input. They
use a mixture of C-style and C++-style linkage to illustrate how these names are
printed differently (see <a class="reference internal" href="#cmdoption-llvm-symbolizer-demangle"><code class="xref std std-option docutils literal notranslate"><span class="pre">--demangle</span></code></a>).</p>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="c1">// test.h</span>
<span class="k">extern</span> <span class="s">&quot;C&quot;</span> <span class="kr">inline</span> <span class="kt">int</span> <span class="n">foz</span><span class="p">()</span> <span class="p">{</span>
  <span class="k">return</span> <span class="mi">1234</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="c1">// test.cpp</span>
<span class="cp">#include</span> <span class="cpf">&quot;test.h&quot;</span><span class="cp"></span>
<span class="kt">int</span> <span class="n">bar</span><span class="o">=</span><span class="mi">42</span><span class="p">;</span>

<span class="kt">int</span> <span class="nf">foo</span><span class="p">()</span> <span class="p">{</span>
  <span class="k">return</span> <span class="n">bar</span><span class="p">;</span>
<span class="p">}</span>

<span class="kt">int</span> <span class="nf">baz</span><span class="p">()</span> <span class="p">{</span>
  <span class="k">volatile</span> <span class="kt">int</span> <span class="n">k</span> <span class="o">=</span> <span class="mi">42</span><span class="p">;</span>
  <span class="k">return</span> <span class="n">foz</span><span class="p">()</span> <span class="o">+</span> <span class="n">k</span><span class="p">;</span>
<span class="p">}</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
  <span class="k">return</span> <span class="n">foo</span><span class="p">()</span> <span class="o">+</span> <span class="n">baz</span><span class="p">();</span>
<span class="p">}</span>
</pre></div>
</div>
<p>These files are built as follows:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> clang -g test.cpp -o test.elf
<span class="gp">$</span> clang -g -O2 test.cpp -o inlined.elf
</pre></div>
</div>
<p>Example 1 - addresses and object on command-line:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> llvm-symbolizer --obj<span class="o">=</span>test.elf 0x4004d0 0x400490
<span class="go">foz</span>
<span class="go">/tmp/test.h:1:0</span>

<span class="go">baz()</span>
<span class="go">/tmp/test.cpp:11:0</span>
</pre></div>
</div>
<p>Example 2 - addresses on standard input:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> cat addr.txt
<span class="go">0x4004a0</span>
<span class="go">0x400490</span>
<span class="go">0x4004d0</span>
<span class="gp">$</span> llvm-symbolizer --obj<span class="o">=</span>test.elf &lt; addr.txt
<span class="go">main</span>
<span class="go">/tmp/test.cpp:15:0</span>

<span class="go">baz()</span>
<span class="go">/tmp/test.cpp:11:0</span>

<span class="go">foz</span>
<span class="go">/tmp/./test.h:1:0</span>
</pre></div>
</div>
<p>Example 3 - object specified with address:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> llvm-symbolizer <span class="s2">&quot;test.elf 0x400490&quot;</span> <span class="s2">&quot;inlined.elf 0x400480&quot;</span>
<span class="go">baz()</span>
<span class="go">/tmp/test.cpp:11:0</span>

<span class="go">foo()</span>
<span class="go">/tmp/test.cpp:8:10</span>

<span class="gp">$</span> cat addr2.txt
<span class="go">test.elf 0x4004a0</span>
<span class="go">inlined.elf 0x400480</span>

<span class="gp">$</span> llvm-symbolizer &lt; addr2.txt
<span class="go">main</span>
<span class="go">/tmp/test.cpp:15:0</span>

<span class="go">foo()</span>
<span class="go">/tmp/test.cpp:8:10</span>
</pre></div>
</div>
<p>Example 4 - CODE and DATA prefixes:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> llvm-symbolizer --obj<span class="o">=</span>test.elf <span class="s2">&quot;CODE 0x400490&quot;</span> <span class="s2">&quot;DATA 0x601028&quot;</span>
<span class="go">baz()</span>
<span class="go">/tmp/test.cpp:11:0</span>

<span class="go">bar</span>
<span class="go">6295592 4</span>

<span class="gp">$</span> cat addr3.txt
<span class="go">CODE test.elf 0x4004a0</span>
<span class="go">DATA inlined.elf 0x601028</span>

<span class="gp">$</span> llvm-symbolizer &lt; addr3.txt
<span class="go">main</span>
<span class="go">/tmp/test.cpp:15:0</span>

<span class="go">bar</span>
<span class="go">6295592 4</span>
</pre></div>
</div>
</div>
<div class="section" id="options">
<h2>OPTIONS<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h2>
<dl class="std option">
<dt id="cmdoption-llvm-symbolizer-adjust-vma">
<code class="sig-name descname">--adjust-vma</code><code class="sig-prename descclassname"> &lt;offset&gt;</code><a class="headerlink" href="#cmdoption-llvm-symbolizer-adjust-vma" title="Permalink to this definition">¶</a></dt>
<dd><p>Add the specified offset to object file addresses when performing lookups.
This can be used to perform lookups as if the object were relocated by the
offset.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-llvm-symbolizer-basenames">
<span id="cmdoption-llvm-symbolizer-s"></span><code class="sig-name descname">--basenames</code><code class="sig-prename descclassname"></code><code class="sig-prename descclassname">, </code><code class="sig-name descname">-s</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-symbolizer-basenames" title="Permalink to this definition">¶</a></dt>
<dd><p>Strip directories when printing the file path.</p>
</dd></dl>

<span class="target" id="llvm-symbolizer-opt-c"></span><dl class="std option">
<dt id="cmdoption-llvm-symbolizer-demangle">
<span id="cmdoption-llvm-symbolizer-C"></span><span id="cmdoption-llvm-symbolizer-c"></span><code class="sig-name descname">--demangle</code><code class="sig-prename descclassname"></code><code class="sig-prename descclassname">, </code><code class="sig-name descname">-C</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-symbolizer-demangle" title="Permalink to this definition">¶</a></dt>
<dd><p>Print demangled function names, if the names are mangled (e.g. the mangled
name <cite>_Z3bazv</cite> becomes <cite>baz()</cite>, whilst the non-mangled name <cite>foz</cite> is printed
as is). Defaults to true.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-llvm-symbolizer-dwp">
<code class="sig-name descname">--dwp</code><code class="sig-prename descclassname"> &lt;path&gt;</code><a class="headerlink" href="#cmdoption-llvm-symbolizer-dwp" title="Permalink to this definition">¶</a></dt>
<dd><p>Use the specified DWP file at <code class="docutils literal notranslate"><span class="pre">&lt;path&gt;</span></code> for any CUs that have split DWARF
debug data.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-llvm-symbolizer-fallback-debug-path">
<code class="sig-name descname">--fallback-debug-path</code><code class="sig-prename descclassname"> &lt;path&gt;</code><a class="headerlink" href="#cmdoption-llvm-symbolizer-fallback-debug-path" title="Permalink to this definition">¶</a></dt>
<dd><p>When a separate file contains debug data, and is referenced by a GNU debug
link section, use the specified path as a basis for locating the debug data if
it cannot be found relative to the object.</p>
</dd></dl>

<span class="target" id="llvm-symbolizer-opt-f"></span><dl class="std option">
<dt id="cmdoption-llvm-symbolizer-functions">
<span id="cmdoption-llvm-symbolizer-f"></span><code class="sig-name descname">--functions</code><code class="sig-prename descclassname"> [&lt;none|short|linkage&gt;]</code><code class="sig-prename descclassname">, </code><code class="sig-name descname">-f</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-symbolizer-functions" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify the way function names are printed (omit function name, print short
function name, or print full linkage name, respectively). Defaults to
<code class="docutils literal notranslate"><span class="pre">linkage</span></code>.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-llvm-symbolizer-help">
<span id="cmdoption-llvm-symbolizer-h"></span><code class="sig-name descname">--help</code><code class="sig-prename descclassname"></code><code class="sig-prename descclassname">, </code><code class="sig-name descname">-h</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-symbolizer-help" title="Permalink to this definition">¶</a></dt>
<dd><p>Show help and usage for this command.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-llvm-symbolizer-help-list">
<code class="sig-name descname">--help-list</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-symbolizer-help-list" title="Permalink to this definition">¶</a></dt>
<dd><p>Show help and usage for this command without grouping the options into categories.</p>
</dd></dl>

<span class="target" id="llvm-symbolizer-opt-i"></span><dl class="std option">
<dt id="cmdoption-llvm-symbolizer-inlining">
<span id="cmdoption-llvm-symbolizer-inlines"></span><span id="cmdoption-llvm-symbolizer-i"></span><code class="sig-name descname">--inlining</code><code class="sig-prename descclassname"></code><code class="sig-prename descclassname">, </code><code class="sig-name descname">--inlines</code><code class="sig-prename descclassname"></code><code class="sig-prename descclassname">, </code><code class="sig-name descname">-i</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-symbolizer-inlining" title="Permalink to this definition">¶</a></dt>
<dd><p>If a source code location is in an inlined function, prints all the inlined
frames. Defaults to true.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-llvm-symbolizer-no-demangle">
<code class="sig-name descname">--no-demangle</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-symbolizer-no-demangle" title="Permalink to this definition">¶</a></dt>
<dd><p>Don’t print demangled function names.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-llvm-symbolizer-obj">
<span id="cmdoption-llvm-symbolizer-exe"></span><span id="cmdoption-llvm-symbolizer-e"></span><code class="sig-name descname">--obj</code><code class="sig-prename descclassname"> &lt;path&gt;</code><code class="sig-prename descclassname">, </code><code class="sig-name descname">--exe</code><code class="sig-prename descclassname"></code><code class="sig-prename descclassname">, </code><code class="sig-name descname">-e</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-symbolizer-obj" title="Permalink to this definition">¶</a></dt>
<dd><p>Path to object file to be symbolized. If <code class="docutils literal notranslate"><span class="pre">-</span></code> is specified, read the object
directly from the standard input stream.</p>
</dd></dl>

<span class="target" id="llvm-symbolizer-opt-output-style"></span><dl class="std option">
<dt id="cmdoption-llvm-symbolizer-output-style">
<code class="sig-name descname">--output-style</code><code class="sig-prename descclassname"> &lt;LLVM|GNU&gt;</code><a class="headerlink" href="#cmdoption-llvm-symbolizer-output-style" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify the preferred output style. Defaults to <code class="docutils literal notranslate"><span class="pre">LLVM</span></code>. When the output
style is set to <code class="docutils literal notranslate"><span class="pre">GNU</span></code>, the tool follows the style of GNU’s <strong>addr2line</strong>.
The differences from the <code class="docutils literal notranslate"><span class="pre">LLVM</span></code> style are:</p>
<ul class="simple">
<li><p>Does not print the column of a source code location.</p></li>
<li><p>Does not add an empty line after the report for an address.</p></li>
<li><p>Does not replace the name of an inlined function with the name of the
topmost caller when inlined frames are not shown and <a class="reference internal" href="#cmdoption-llvm-symbolizer-use-symbol-table"><code class="xref std std-option docutils literal notranslate"><span class="pre">--use-symbol-table</span></code></a>
is on.</p></li>
</ul>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> llvm-symbolizer --obj<span class="o">=</span>inlined.elf 0x4004be 0x400486 -p
<span class="go">baz() at /tmp/test.cpp:11:18</span>
<span class="go"> (inlined by) main at /tmp/test.cpp:15:0</span>

<span class="go">foo() at /tmp/test.cpp:6:3</span>

<span class="gp">$</span> llvm-symbolizer --output-style<span class="o">=</span>LLVM --obj<span class="o">=</span>inlined.elf 0x4004be 0x400486 -p -i<span class="o">=</span><span class="m">0</span>
<span class="go">main at /tmp/test.cpp:11:18</span>

<span class="go">foo() at /tmp/test.cpp:6:3</span>

<span class="gp">$</span> llvm-symbolizer --output-style<span class="o">=</span>GNU --obj<span class="o">=</span>inlined.elf 0x4004be 0x400486 -p -i<span class="o">=</span><span class="m">0</span>
<span class="go">baz() at /tmp/test.cpp:11</span>
<span class="go">foo() at /tmp/test.cpp:6</span>
</pre></div>
</div>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-llvm-symbolizer-pretty-print">
<span id="cmdoption-llvm-symbolizer-p"></span><code class="sig-name descname">--pretty-print</code><code class="sig-prename descclassname"></code><code class="sig-prename descclassname">, </code><code class="sig-name descname">-p</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-symbolizer-pretty-print" title="Permalink to this definition">¶</a></dt>
<dd><p>Print human readable output. If <a class="reference internal" href="#cmdoption-llvm-symbolizer-inlining"><code class="xref std std-option docutils literal notranslate"><span class="pre">--inlining</span></code></a> is specified, the
enclosing scope is prefixed by (inlined by).</p>
</dd></dl>

<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> llvm-symbolizer --obj<span class="o">=</span>inlined.elf 0x4004be --inlining --pretty-print
<span class="go">baz() at /tmp/test.cpp:11:18</span>
<span class="go"> (inlined by) main at /tmp/test.cpp:15:0</span>
</pre></div>
</div>
<dl class="std option">
<dt id="cmdoption-llvm-symbolizer-print-address">
<span id="cmdoption-llvm-symbolizer-addresses"></span><span id="cmdoption-llvm-symbolizer-a"></span><code class="sig-name descname">--print-address</code><code class="sig-prename descclassname"></code><code class="sig-prename descclassname">, </code><code class="sig-name descname">--addresses</code><code class="sig-prename descclassname"></code><code class="sig-prename descclassname">, </code><code class="sig-name descname">-a</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-symbolizer-print-address" title="Permalink to this definition">¶</a></dt>
<dd><p>Print address before the source code location. Defaults to false.</p>
</dd></dl>

<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> llvm-symbolizer --obj<span class="o">=</span>inlined.elf --print-address 0x4004be
<span class="go">0x4004be</span>
<span class="go">baz()</span>
<span class="go">/tmp/test.cpp:11:18</span>
<span class="go">main</span>
<span class="go">/tmp/test.cpp:15:0</span>

<span class="gp">$</span> llvm-symbolizer --obj<span class="o">=</span>inlined.elf 0x4004be --pretty-print --print-address
<span class="go">0x4004be: baz() at /tmp/test.cpp:11:18</span>
<span class="go"> (inlined by) main at /tmp/test.cpp:15:0</span>
</pre></div>
</div>
<dl class="std option">
<dt id="cmdoption-llvm-symbolizer-print-source-context-lines">
<code class="sig-name descname">--print-source-context-lines</code><code class="sig-prename descclassname"> &lt;N&gt;</code><a class="headerlink" href="#cmdoption-llvm-symbolizer-print-source-context-lines" title="Permalink to this definition">¶</a></dt>
<dd><p>Print <code class="docutils literal notranslate"><span class="pre">N</span></code> lines of source context for each symbolized address.</p>
</dd></dl>

<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> llvm-symbolizer --obj<span class="o">=</span>test.elf 0x400490 --print-source-context-lines<span class="o">=</span><span class="m">2</span>
<span class="go">baz()</span>
<span class="go">/tmp/test.cpp:11:0</span>
<span class="go">10  :   volatile int k = 42;</span>
<span class="go">11 &gt;:   return foz() + k;</span>
<span class="go">12  : }</span>
</pre></div>
</div>
<span class="target" id="llvm-symbolizer-opt-use-symbol-table"></span><dl class="std option">
<dt id="cmdoption-llvm-symbolizer-use-symbol-table">
<code class="sig-name descname">--use-symbol-table</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-symbolizer-use-symbol-table" title="Permalink to this definition">¶</a></dt>
<dd><p>Prefer function names stored in symbol table to function names in debug info
sections. Defaults to true.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-llvm-symbolizer-verbose">
<code class="sig-name descname">--verbose</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-symbolizer-verbose" title="Permalink to this definition">¶</a></dt>
<dd><p>Print verbose line and column information.</p>
</dd></dl>

<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> llvm-symbolizer --obj<span class="o">=</span>inlined.elf --verbose 0x4004be
<span class="go">baz()</span>
<span class="go">  Filename: /tmp/test.cpp</span>
<span class="go">Function start line: 9</span>
<span class="go">  Line: 11</span>
<span class="go">  Column: 18</span>
<span class="go">main</span>
<span class="go">  Filename: /tmp/test.cpp</span>
<span class="go">Function start line: 14</span>
<span class="go">  Line: 15</span>
<span class="go">  Column: 0</span>
</pre></div>
</div>
<dl class="std option">
<dt id="cmdoption-llvm-symbolizer-version">
<code class="sig-name descname">--version</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-symbolizer-version" title="Permalink to this definition">¶</a></dt>
<dd><p>Print version information for the tool.</p>
</dd></dl>

<dl class="std option">
<dt id="cmdoption-llvm-symbolizer-arg-FILE">
<span id="cmdoption-llvm-symbolizer-arg-file"></span><code class="sig-name descname">&#64;&lt;FILE&gt;</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-symbolizer-arg-FILE" title="Permalink to this definition">¶</a></dt>
<dd><p>Read command-line options from response file <cite>&lt;FILE&gt;</cite>.</p>
</dd></dl>

</div>
<div class="section" id="mach-o-specific-options">
<h2>MACH-O SPECIFIC OPTIONS<a class="headerlink" href="#mach-o-specific-options" title="Permalink to this headline">¶</a></h2>
<dl class="std option">
<dt id="cmdoption-llvm-symbolizer-default-arch">
<code class="sig-name descname">--default-arch</code><code class="sig-prename descclassname"> &lt;arch&gt;</code><a class="headerlink" href="#cmdoption-llvm-symbolizer-default-arch" title="Permalink to this definition">¶</a></dt>
<dd><p>If a binary contains object files for multiple architectures (e.g. it is a
Mach-O universal binary), symbolize the object file for a given architecture.
You can also specify the architecture by writing <code class="docutils literal notranslate"><span class="pre">binary_name:arch_name</span></code> in
the input (see example below). If the architecture is not specified in either
way, the address will not be symbolized. Defaults to empty string.</p>
</dd></dl>

<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$</span> cat addr.txt
<span class="go">/tmp/mach_universal_binary:i386 0x1f84</span>
<span class="go">/tmp/mach_universal_binary:x86_64 0x100000f24</span>

<span class="gp">$</span> llvm-symbolizer &lt; addr.txt
<span class="go">_main</span>
<span class="go">/tmp/source_i386.cc:8</span>

<span class="go">_main</span>
<span class="go">/tmp/source_x86_64.cc:8</span>
</pre></div>
</div>
<dl class="std option">
<dt id="cmdoption-llvm-symbolizer-dsym-hint">
<code class="sig-name descname">--dsym-hint</code><code class="sig-prename descclassname"> &lt;path/to/file.dSYM&gt;</code><a class="headerlink" href="#cmdoption-llvm-symbolizer-dsym-hint" title="Permalink to this definition">¶</a></dt>
<dd><p>If the debug info for a binary isn’t present in the default location, look for
the debug info at the .dSYM path provided via this option. This flag can be
used multiple times.</p>
</dd></dl>

</div>
<div class="section" id="exit-status">
<h2>EXIT STATUS<a class="headerlink" href="#exit-status" title="Permalink to this headline">¶</a></h2>
<p><strong class="program">llvm-symbolizer</strong> returns 0. Other exit codes imply an internal program
error.</p>
</div>
<div class="section" id="see-also">
<h2>SEE ALSO<a class="headerlink" href="#see-also" title="Permalink to this headline">¶</a></h2>
<p><em class="manpage"><a class="manpage reference external" href="https://llvm.org/docs/CommandGuide/llvm-addr2line.html">llvm-addr2line(1)</a></em></p>
</div>
</div>


            <div class="clearer"></div>
          </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="llvm-dwarfdump.html" title="llvm-dwarfdump - dump and verify DWARF debug information"
             >next</a> |</li>
        <li class="right" >
          <a href="llvm-stress.html" title="llvm-stress - generate random .ll files"
             >previous</a> |</li>
  <li><a href="http://llvm.org/">LLVM Home</a>&nbsp;|&nbsp;</li>
  <li><a href="../index.html">Documentation</a>&raquo;</li>

          <li class="nav-item nav-item-1"><a href="index.html" >LLVM Command Guide</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">llvm-symbolizer - convert addresses into source code locations</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2003-2020, LLVM Project.
      Last updated on 2020-09-20.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
    </div>
  </body>
</html>